using System.ComponentModel;

using TrueCode.Core;

namespace EMan.Interface.Common
{
	/// <summary>
	/// Used to display an information about some activity by a View and make it possible cancel the activity.
	/// </summary>
	public interface IActivity : INotifyPropertyChanged
	{
		/// <summary>
		/// The title of the activity.
		/// </summary>
		string Title { get; }

		/// <summary>
		/// Details of a current state of the activity.
		/// </summary>
		string	Details{ get; }

		/// <summary>
		/// Gets a value indicating whether the activity can be canceled.
		/// </summary>
		///<value>true if the activity can be canceled.</value>
		bool Cancelable	{ get; }

		/// <summary>
		/// Cancels the activity.
		/// </summary>
		/// <exception cref="Exception{IActivity, InvalidOperationException}">Thrown if the activity is not cancelable 
		/// <see cref="Cancelable"/> for details.</exception>
		void Cancel();
	}
}